home *** CD-ROM | disk | FTP | other *** search
- Path: news.mel.aone.net.au!usenet
- From: clyde@hitech.com.au (Clyde Smith-Stubbs)
- Newsgroups: comp.lang.c
- Subject: Re: IEEE Format
- Date: Tue, 23 Jan 1996 12:02:25 GMT
- Organization: HI-TECH Software
- Message-ID: <3104ce13.194969792@news.bne.aone.net.au>
- References: <4e2bk7$qol@oznet07.ozemail.com.au>
- Reply-To: clyde@hitech.com.au
- NNTP-Posting-Host: skyhawk.hitech.com.au
- X-Newsreader: Forte Agent .99c/16.141
-
- On 23 Jan 1996 10:00:39 GMT, Mark Richter <mrichter@ozemail.com.au>
- wrote:
-
- >I am having difficulty with floating point precesion within a Borlamd C++
- >4.5. Borland uses the international IEEE format to provide it's floating
- >point arithmetic but failed to supply any documentation aa what it
- >actually is. I was hoping someone may be able to help me with the
- >bit/byte layout of this standard ?
-
- ; The format of floating point numbers is as follows:
-
- ; -----------------
- ; * mantissa * 23 bits + 1 implied bit = 24 bits
- ; -----------------
- ; * exponent * 8 bits
- ; -----------------
- ; * sign * 1 bit
- ; -----------------
-
- ; Double floating point is as follows:
-
- ; -----------------
- ; * mantissa * 52 bits + 1 implied bit = 53 bits
- ; -----------------
- ; * exponent * 11 bits
- ; -----------------
- ; * sign * 1 bit
- ; -----------------
-
- ; The implied bit is always 1 except for a zero value where it
- is
- ; zero. A zero value is indicated by a zero exponent. The
- exponent
- ; for a float is stored as excess 127 (i.e. an exponent of 0 is
- ; represented by 127) and for a double as excess 1023. The
- mantissa
- ; is in positive magnitude form.
-
- ----
- Clyde Smith-Stubbs | HI-TECH Software, | Voice: +61 7 3300 5011
- clyde@hitech.com.au | P.O. Box 103, Alderley, | Fax: +61 7 3300 5246
- http://www.hitech.com.au | QLD, 4051, AUSTRALIA. | BBS: +61 7 3300 5235
- ----------------------------------------------------------------------------
- FREE! Download our shareware (FREE for noncommercial use) MS-DOS C Compiler!
- Point your Web browser at http://www.hitech.com.au/
-